import request from '@/common/js/request.js'



export default {
	// 获取轮播图信息     参数为第几章轮播图
	getAdvertList(position = 1) {
		return request({
			url: `/article/api/advert/show/${position}`,
			method: 'GET'
		})
	},
	
	// 获取分类列表信息
	getCategoryList() {
		return request({
			url: '/article/api/category/label/list',
			method: 'GET'
		})
	},
	// 条件分页查询课程列表   query条件对象{isFree: 0}，参数为：current当前页码，size每页显示多少条
	getList(query, current = 1, size = 10) {
		return request({
			url: '/course/api/course/search',
			method: 'POST',
			data: {...query, current, size} // ...query的内容就是  {isFree: 0, current: current, size: size}
		})
	},
	
}